3.813 \(\int \frac{A+B x}{\sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=99 \[ \frac{2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{2 B \sqrt{x} (a+b x)}{b \sqrt{a^2+2 a b x+b^2 x^2}} \]

[Out]

(2*B*Sqrt[x]*(a + b*x))/(b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*(A*b - a*B)*(a + b*x)*ArcTan[(Sqrt[b]*Sqrt[x])/
Sqrt[a]])/(Sqrt[a]*b^(3/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

________________________________________________________________________________________

Rubi [A]  time = 0.0518154, antiderivative size = 99, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {770, 80, 63, 205} \[ \frac{2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2} \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{2 B \sqrt{x} (a+b x)}{b \sqrt{a^2+2 a b x+b^2 x^2}} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(2*B*Sqrt[x]*(a + b*x))/(b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*(A*b - a*B)*(a + b*x)*ArcTan[(Sqrt[b]*Sqrt[x])/
Sqrt[a]])/(Sqrt[a]*b^(3/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{A+B x}{\sqrt{x} \sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\left (a b+b^2 x\right ) \int \frac{A+B x}{\sqrt{x} \left (a b+b^2 x\right )} \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{2 B \sqrt{x} (a+b x)}{b \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{\left (2 \left (\frac{A b^2}{2}-\frac{a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \int \frac{1}{\sqrt{x} \left (a b+b^2 x\right )} \, dx}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{2 B \sqrt{x} (a+b x)}{b \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{\left (4 \left (\frac{A b^2}{2}-\frac{a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a b+b^2 x^2} \, dx,x,\sqrt{x}\right )}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{2 B \sqrt{x} (a+b x)}{b \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{2 (A b-a B) (a+b x) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )}{\sqrt{a} b^{3/2} \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}

Mathematica [A]  time = 0.0387203, size = 72, normalized size = 0.73 \[ \frac{2 (a+b x) \left ((A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} \sqrt{x}}{\sqrt{a}}\right )+\sqrt{a} \sqrt{b} B \sqrt{x}\right )}{\sqrt{a} b^{3/2} \sqrt{(a+b x)^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(2*(a + b*x)*(Sqrt[a]*Sqrt[b]*B*Sqrt[x] + (A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]]))/(Sqrt[a]*b^(3/2)*Sqr
t[(a + b*x)^2])

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 65, normalized size = 0.7 \begin{align*} 2\,{\frac{bx+a}{\sqrt{ \left ( bx+a \right ) ^{2}}b\sqrt{ab}} \left ( A\arctan \left ({\frac{\sqrt{x}b}{\sqrt{ab}}} \right ) b+B\sqrt{x}\sqrt{ab}-B\arctan \left ({\frac{\sqrt{x}b}{\sqrt{ab}}} \right ) a \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x)

[Out]

2*(b*x+a)*(A*arctan(x^(1/2)*b/(a*b)^(1/2))*b+B*x^(1/2)*(a*b)^(1/2)-B*arctan(x^(1/2)*b/(a*b)^(1/2))*a)/((b*x+a)
^2)^(1/2)/b/(a*b)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.36796, size = 250, normalized size = 2.53 \begin{align*} \left [\frac{2 \, B a b \sqrt{x} +{\left (B a - A b\right )} \sqrt{-a b} \log \left (\frac{b x - a - 2 \, \sqrt{-a b} \sqrt{x}}{b x + a}\right )}{a b^{2}}, \frac{2 \,{\left (B a b \sqrt{x} +{\left (B a - A b\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b}}{b \sqrt{x}}\right )\right )}}{a b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

[(2*B*a*b*sqrt(x) + (B*a - A*b)*sqrt(-a*b)*log((b*x - a - 2*sqrt(-a*b)*sqrt(x))/(b*x + a)))/(a*b^2), 2*(B*a*b*
sqrt(x) + (B*a - A*b)*sqrt(a*b)*arctan(sqrt(a*b)/(b*sqrt(x))))/(a*b^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**(1/2)/((b*x+a)**2)**(1/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.12752, size = 77, normalized size = 0.78 \begin{align*} \frac{2 \, B \sqrt{x} \mathrm{sgn}\left (b x + a\right )}{b} - \frac{2 \,{\left (B a \mathrm{sgn}\left (b x + a\right ) - A b \mathrm{sgn}\left (b x + a\right )\right )} \arctan \left (\frac{b \sqrt{x}}{\sqrt{a b}}\right )}{\sqrt{a b} b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

2*B*sqrt(x)*sgn(b*x + a)/b - 2*(B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b)